package com.ow.dva.module.order.mapper;

import com.ow.dva.module.base.entity.param.DvaPage;
import com.ow.dva.module.base.mapper.BaseMapper;
import com.ow.dva.module.order.entity.Order;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author YanZengBao
 * @version V1.0
 * @since 2020-02-19
 */
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 分页获取订单表数据列表信息。
     * 创建时间：2020-02-19 YanZengBao
     * 修改时间：2020-02-19 YanZengBao 加注释
     * 修改时间：
     *
     * @param page  分页参数
     * @param param 条件参数
     * @return 带分页的数据集
     */
    DvaPage<Order> page(DvaPage<Order> page, @Param("param") Map<String, Object> param);

    List<Order> selectByplateNo(@Param("param") Map map);

    Order selectNewOrderByRoad(String id);

    List<Order> selectOrderListByRoad(String roadId);

    List<Order> selectByParkId(String parkId);

    List<Order> getAllTodayOrders();

    List<Order> getAllTodayOrdersByParkId(String parkId);

    List<Order> getAllTodayOrders1();

    List<Order> getAllTodayOrdersByParkId1(String parkId);

    List<Order> someDayOrders(@Param("param") Map map);

    List<Order> someDayOrdersByPark(@Param("param") Map map);

    List<Order> halfMonthOrdersByPark(@Param("param") Map map);

    List<Order> halfMonthOrders(@Param("param") Map map);

    List<Order> oneMonthOrdersByPark(@Param("param") Map map);

    List<Order> oneMonthOrders(@Param("param") Map map);

    List<Order> oneYearOrdersByPark(@Param("param") Map map);

    List<Order> oneYearOrders(@Param("param") Map map);


    long countOrderByPark(String parkId, Date nowTime);
    List<Order> sevenDayOrdersByPark(@Param("param") Map map);
}
